package com.sanen.flyer.entity.enemy;

import com.sanen.flyer.entity.script.EmptySprit;
import com.sanen.flyer.tool.ImageTool;

import java.awt.*;
import java.awt.image.BufferedImage;

/**
 * @author wsse
 * @date 2018-09-07 10:45
 */
public class air1 extends Enemy {
    public air1(BufferedImage image, int x, int y) {
        this.image = image;
        this.width = image.getWidth()/2;
        this.height = image.getHeight() / 2;
        this.x = x;
        this.y = y;
        this.speedy = 1;
        this.speedx = 0.5;
        sprit=new EmptySprit(this,image);
        this.HP=100;
        this.hp=HP;
    }

    @Override
    public void draw(Graphics g) {
        ImageTool.rotate(g, ImageTool.getTheta(speedx, speedy, -1 ), x + width / 2, y + height / 2, ()-> {
            sprit.draw(g);
        });
    }

    @Override
    public void logic() {
        move();
    }


}
